<template>
  <div>
    <Header></Header>  
    <router-view></router-view>   
    <!-- 这样的方式可以去隐藏Footer 但是不好  ,如果要隐藏的页面很多 -->
    <!-- <Footer v-show="$route.path !=='/login' && $route.path !=='/register' "></Footer> -->
    <Footer v-show="!$route.meta.isHidden"></Footer>
  </div>
</template>

<script>
import Header from '@/components/Header'
import Footer from '@/components/Footer'
export default {
  name: 'App',
  mounted(){
    this.getCategoryList();
  },
  components:{Header,Footer},
  methods:{
      getCategoryList() {
      this.$store.dispatch("getCategoryList");
    },
  }
}
</script>

<style lang="less" scoped>

</style>
